function y = g_q(x)
% Generalized quartic  function
% x0=ones(n,1); 
n=length(x); y=0;
for i=1:n-1
    y=y+(x(i))^2+(x(i+1)+(x(i))^2)^2;
end
